class YahooSearchEngine < SearchEngine

	def initialize(obj_ref, wlist, bsize)
		super(obj_ref, wlist, bsize)
    @language='it'          # only italian pages
    @app_id = 'fQ19NwLV34FPwYY.h2I1Hc8VcSfCGGCiUPY8kFfi2m8cjbKeAx3YxV0779bydcfE2Q--'
  end

  def search(num_of_results)
    super(num_of_results)
    for query in @searchString
    	$logger.info("YahooSearchEngine") {"query -> #{query}"}
    	stringQuery = query.join()
    	obj = WebSearch.new(@app_id, stringQuery, num_of_results, 'all')
    	obj.set_language(@language)
    	# get the results -- returns an array of hashes
    	results = obj.parse_results
    	results.map {|r| @tmpList << r['Url']}   # get url
    end #for 
    @urlManager.add_urls_yahoo(@tmpList) 
    return @urlManager
   end
   
end #class
